<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="java.text.DecimalFormat" %>
<%@page import="com.lmpop.trade.ts_memlevel.Ts_memlevelInfo" %>
<%
	 
	 String sale_price="0.00"; 
   if(request.getParameter("sale_price")!=null)
   {
   
   sale_price = request.getParameter("sale_price");
   }
   
   Ts_memlevelInfo ts_memlevelInfo =new Ts_memlevelInfo();  
   
   List memLevelList =ts_memlevelInfo.getMemLevelAll();
   
   DecimalFormat  df  = new DecimalFormat("0.00");
   
   StringBuffer priceMember = new StringBuffer();   
   if(memLevelList !=null && memLevelList.size()>0)
   {	
      for(int i=0;i<memLevelList.size();i++)
      {
          Hashtable lmap =(Hashtable)memLevelList.get(i);
          String user_class="",class_name="",discount=""; 
          if(lmap.get("user_class")!=null)
          {
                user_class =lmap.get("user_class").toString();             
          } 
          if(lmap.get("discount")!=null)
          {
                discount =lmap.get("discount").toString();             
          }
          if(!sale_price.equals("") && !discount.equals(""))
          {
             double rm_price = Double.parseDouble(sale_price)*Double.parseDouble(discount)*0.01;
             String sm_price = df.format(rm_price);
             priceMember.append(user_class+"|"+sm_price+",");
          }           
       }
}
out.println(priceMember.toString());   
   
%>	
 
